package com.example.tests;

import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {

	@Test
	public void testNonEmptyContactCreation() throws Exception {
		ContactData contact = new ContactData();
		contact.firstname = "first name 1";
		contact.lastname = "last name 1";
		contact.address = "address 1";
		contact.hometel = "home telephone";
		contact.mobiltel = "mobil telephone";
		contact.worktel = "work telephone";
		contact.email = "test@test.ru";
		contact.email2 = "test2@test.ru";
		contact.bday = "1";
		contact.bmonth = "January";
		contact.byear = "1977";
		contact.group = "Rob";
		contact.addressdop = "adress dop 1";
		contact.phone2 = "1";
		
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().initContactCreation();
		app.getContactHelper().fillContactForm(contact, true);
		app.getContactHelper().submitContactCreation();
		app.getNavigationHelper().openMainPage();
	}

	@Test
	public void testEmptyContactCreation() throws Exception {
		ContactData contact = new ContactData();
		contact.firstname = "";
		contact.lastname = "";
		contact.address = "";
		contact.hometel = "";
		contact.mobiltel = "";
		contact.worktel = "";
		contact.email = "";
		contact.email2 = "";
		contact.bday = "-";
		contact.bmonth = "-";
		contact.byear = "";
		contact.group = "[none]";
		contact.addressdop = "";
		contact.phone2 = "";
		
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().initContactCreation();
		app.getContactHelper().fillContactForm(contact, true);
		app.getContactHelper().submitContactCreation();
		app.getNavigationHelper().openMainPage();
	}

}

